﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace jogoLudumdare
{
    class Controles : State
    {
        private Background creditsBG;
        private KeyboardState keyNow;
        private MouseState mouseNow;
        Texture2D TelainstPORT2, TelainstING2;

        public Controles(ContentManager content)
        { TelainstPORT2 = content.Load<Texture2D>(@"TelasMenu\Portugues\Instrucoes_2");
            TelainstING2 = content.Load<Texture2D>(@"TelasMenu\Ingles\controles_ingles");
            creditsBG = new Background(TelainstING2, new Rectangle(0, 0, 800, 600));
           
        }

        public void Update(GameTime gameTime)
        {
            keyNow = Keyboard.GetState();
            mouseNow = Mouse.GetState();

            if (Game1.IdiomaAtual == Game1.EstadoIdioma.Ingles)
            {
                creditsBG.texture = TelainstING2;

            }
            if (Game1.IdiomaAtual == Game1.EstadoIdioma.Portugues)
            {
                creditsBG.texture = TelainstPORT2;

            }
            if (keyNow.IsKeyDown(Keys.Escape))
            //mouseNow.LeftButton == ButtonState.Pressed ||
            //mouseNow.RightButton == ButtonState.Pressed)
            {
                nextState = GameState.Menu;
            }
        }
        public void Draw(SpriteBatch spriteBatch, MouseState mouse)
        {
            spriteBatch.Draw(creditsBG.texture, creditsBG.rectanglePicture, Color.White);
        }


    }
}
